import pygame, os
from pygame.locals import *

class Shot:
    def __init__(self, x, y, xspeed, yspeed, filename):
        self.surface = pygame.image.load(os.path.join("img", filename))
        self.x = x
        self.y = y
        self.xspeed = xspeed
        self.yspeed = yspeed

    def update(self):
        self.x += self.xspeed
        self.y += self.yspeed
        if self.y > 2000 or self.y < -500:
            return False
        return True
